package com.jinbo.footmessageworker.turn;

import android.opengl.Visibility;
import android.os.Bundle;
import android.view.View;

import com.baoyz.widget.PullRefreshLayout;
import com.jinbo.footmessageworker.BaseActivity;
import com.jinbo.footmessageworker.R;
import com.jinbo.footmessageworker.turn.MoreTurnActivity;
import com.jinbo.footmessageworker.view.TitleBarView;

public class TurnActivity extends BaseActivity implements View.OnClickListener {

    /*private PullRefreshLayout mPullRefreshLayout;*/

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_turn);
        TitleBarView titleBarView = (TitleBarView) findViewById(R.id.titleBar);
        titleBarView.setCenterTitle("班次");
        titleBarView.setLeftBackButtonIsVisibler(true);
        titleBarView.setListener(TitleBarView.TitleBarEnum.ll_leftBackImageLayout, this);
        titleBarView.setRightTextIsVisible(true, "更多班次");
        titleBarView.setListener(TitleBarView.TitleBarEnum.ll_rightNextTextLayout,this);
        initView();
        setListener();
    }

    void initView() {
      /*  mPullRefreshLayout = (PullRefreshLayout) findViewById(R.id.turnRefreshLayout);*/
    }

    void setListener() {
  /*      mPullRefreshLayout.setOnRefreshListener(new PullRefreshLayout.OnRefreshListener() {

            @Override
            public void onRefresh() {

                mPullRefreshLayout.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        mPullRefreshLayout.setRefreshing(false);
                    }
                }, 1000);
            }


        });*/

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.left_back_layout:
                finish();
                break;
            case R.id.right_next_text_layout:
                MoreTurnActivity.launch(this);
                break;
        }
    }
   /* public void moreTurn(View view)
    {
        MoreTurnActivity.launch(this);
    }*/
}
